package com.wmlive.hhvideo.heihei.beans.main;


import com.google.gson.Gson;
import com.wmlive.hhvideo.common.base.BaseModel;

import java.util.List;

/**
 * Created by vhawk on 2017/5/24.
 */

public class Author extends BaseModel {


    /**
     * name : 张黎雯
     * cover_url : http://wx.qlogo.cn/mmopen/diaicJRTwgx4y8oVxXzaegJbyX6WLRoZ4XY4DMLnQr6rP7QLlo7PRD5ZpVicicaY14eqRzdAOnEwW9bMlo8Aacy6dA/132
     * relation : {"is_follow":false,"is_fans":false}
     * honours : []
     * dc_num :
     * id : 10057
     * description :
     */

    private String name;
    private String cover_url;
    private String dc_num;
    private long id;
    private String description;
    private List<AuthorHonourBean> honours;//用户的勋章信息

    private UserFanRelation relation;

    public String getName() {
        return name;
    }

    public Author setName(String name) {
        this.name = name;
        return this;
    }

    public String getCover_url() {
        return cover_url;
    }

    public Author setCover_url(String cover_url) {
        this.cover_url = cover_url;
        return this;
    }

    public String getDc_num() {
        return dc_num;
    }

    public Author setDc_num(String dc_num) {
        this.dc_num = dc_num;
        return this;
    }

    public long getId() {
        return id;
    }

    public Author setId(long id) {
        this.id = id;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public Author setDescription(String description) {
        this.description = description;
        return this;
    }

    public List<AuthorHonourBean> getHonours() {
        return honours;
    }

    public Author setHonours(List<AuthorHonourBean> honours) {
        this.honours = honours;
        return this;
    }

    public UserFanRelation getRelation() {
        return relation;
    }

    public Author setRelation(UserFanRelation relation) {
        this.relation = relation;
        return this;
    }


    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("Author{" +
                "name='" + name + '\'' +
                ", cover_url='" + cover_url + '\'' +
                ", dc_num='" + dc_num + '\'' +
                ", id=" + id +
                ", description='" + description + '\'');
        if(honours!=null && honours.size()>0){
           String honoursJson =  new Gson().toJson(honours);
            sb.append(",honours=").append(honoursJson);
        }else{
            sb.append(",honours=\"\"");
        }
        if(relation!=null ){
            String relationJson =  new Gson().toJson(relation);
            sb.append(",relation=").append(relationJson);
        }else{
            sb.append(",relation=\"\"");
        }
        sb.append("}");
        return  sb.toString();

    }
}
